<template>
    <div class="tabbar">
        <div>tabBar组件</div>
        <div>props: {{ $props }}</div>
        <div>attrs: {{ $attrs }}</div>
    </div>
</template>

<script setup>
import { useAttrs } from 'vue'
defineOptions({
    // 不会将父组件传递的透传属性自动设置在子组件根标签中
    inheritAttrs: false
})

// 接收父传递的props
const props = defineProps(['a'])
console.log('props=>', props)

const attrs = useAttrs()
console.log('attrs=>', attrs)
</script>